Skip to content

feat: added a check for gc code to run #3419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025

Conversation

JustinRush80
Copy link
Contributor

Description

Add a validation check that only runs if generated columns feature is enabled in the tablefeatures or writer version 5 is enabled

Related Issue(s)

Documentation

@github-actions github-actions bot added the binding/rust Issues for the Rust crate label May 7, 2025
Copy link

github-actions bot commented May 7, 2025

ACTION NEEDED

delta-rs follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@JustinRush80 JustinRush80 changed the title Added a check for GC code to run feat: added a check for gc code to run May 7, 2025
Copy link
Collaborator

@ion-elgreco ion-elgreco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two nits, otherwise we are good to go! :)

Thanks for picking this up

Comment on lines 454 to 458
let generated_col_expressions = this
.snapshot
.as_ref()
.map(|v| v.schema().get_generated_columns().unwrap_or_default())
.unwrap_or_default();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do snapshot.schema() now since you already checked existence :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh thank you for the catch!

let (source, missing_generated_columns) =
add_missing_generated_columns(source.clone(), &generated_col_expressions)?;

source_with_gc = Some(source);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit, but we can do same as you did in the write mod, just use a mut source

@ion-elgreco
Copy link
Collaborator

@JustinRush80 is it ready?

@JustinRush80
Copy link
Contributor Author

@JustinRush80 is it ready?

Yes I believe so should I be concerned about the failed coverage check?

@JustinRush80 JustinRush80 marked this pull request as ready for review May 13, 2025 14:48
@hntd187 hntd187 requested a review from ion-elgreco May 13, 2025 15:03
Copy link
Collaborator

@hntd187 hntd187 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think Ion got most of it

@ion-elgreco ion-elgreco added this pull request to the merge queue May 13, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch May 13, 2025
@ion-elgreco
Copy link
Collaborator

@JustinRush80 is it ready?

Yes I believe so should I be concerned about the failed coverage check?

No it got broken since we added the dat tests, so no worries. Can you rebase, so that it can auto merge?

@JustinRush80 JustinRush80 force-pushed the fix/valid_gc branch 3 times, most recently from d3ff34b to dac4a70 Compare May 14, 2025 01:25
@rtyler rtyler enabled auto-merge May 14, 2025 13:23
Signed-off-by: JustinRush80 <[email protected]>
auto-merge was automatically disabled May 14, 2025 20:14

Head branch was pushed to by a user without write access

@ion-elgreco ion-elgreco enabled auto-merge May 15, 2025 12:32
@ion-elgreco ion-elgreco added this pull request to the merge queue May 15, 2025
Merged via the queue into delta-io:main with commit 1c29aa6 May 15, 2025
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/rust Issues for the Rust crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generated columns feature needs to be checked
3 participants